package com.zzq.my.jetpacks.jectpackapp.bean

import androidx.annotation.Keep
import java.io.Serializable

/*
  * ================================================
  * 描述：交易的筛选条件实体定义
  * 作者：zhuangzeqin
  * 时间: 2022/11/28-19:37
  * 邮箱：zzq@eeepay.cn
  * 备注: 1 先实现 Cloneable, 重写 clone 方法. 2 model 调用 clone 就会生成一个 全新的对象.
  * ----------------------------------------------------------------
  * You never know what you can do until you try !
  *      _              _           _     _   ____  _             _ _
  *     / \   _ __   __| |_ __ ___ (_) __| | / ___|| |_ _   _  __| (_) ___
  *    / _ \ | '_ \ / _` | '__/ _ \| |/ _` | \___ \| __| | | |/ _` | |/ _ \
  *   / ___ \| | | | (_| | | | (_) | | (_| |  ___) | |_| |_| | (_| | | (_) |
  *  /_/   \_\_| |_|\__,_|_|  \___/|_|\__,_| |____/ \__|\__,_|\__,_|_|\___/
  *
  * 签名：最痛苦的事不是我失败了，而是我本可以.--zzq
  * ----------------------------------------------------------------
  * ================================================
  */
@Keep
data class TradeFilterOptionConfig(
    var agentNo: String = "",
    var agentTxt: String = "",//所属代理名称
    var merchantItem: String = "",//输入框内的内容
    var policyNo: String = "",
    var policyTxt: String = "",//政策名称
    var productNo: String = "",
    var productText: String = "",//产品名称
    var activityTransFlag: String = "",
    var deviceSn: String = "",
    var transStatus: String = "",
    var transStatusTxt: String = "",//交易状态name
    var settleStatus: String = "",
    var settleStatusTxt: String = "",//结算状态name
    var settleType: String = "",
    var settleTypeTxt: String = "",//结算方式name
    var payMethod: String = "",
    var payMethodTxt: String = "",//交易类型name
    var payTypeParent: String = "",
    var payTypeParentTxt: String = "",//支付类型name
    var beginTransTime: String = "",
    var endTransTime: String = "",
    var addProductServiceFeeFlag: String = "",
    var addFlowFeeFlag: String = "",
    var transOrderNo: String = ""
) : Serializable, Cloneable {

    public override fun clone(): TradeFilterOptionConfig {
        return try {
            return super.clone() as? TradeFilterOptionConfig ?: TradeFilterOptionConfig()
        } catch (e: CloneNotSupportedException) {
            TradeFilterOptionConfig()
        }

    }
}

/**
 * 创建一个TradeFilterOptionConfig
 */
fun createTradeFilterOptionConfig(block: TradeFilterOptionConfig.() -> Unit): TradeFilterOptionConfig {
    return TradeFilterOptionConfig().apply(block)
}